package com.alibaba.ai.service.impl;

import com.alibaba.ai.entity.YPost;
import com.alibaba.ai.service.YPostService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
public class YPostServiceImpl implements YPostService {
   @Resource
    private com.alibaba.ai.dao.YPostMapper YPostMapper;

    @Transactional
    @Override
    public List<YPost> getPostListByWeek() {
        return YPostMapper.getPostListByWeek();
    }

    @Transactional
    @Override
    public List<YPost> getPostListByMonth() {
        return YPostMapper.getPostListByMonth();
    }

    @Transactional
    @Override
    public List<YPost> getPostListByUserId(Integer yUsersId) {
        return YPostMapper.getPostListByUserId(yUsersId);
    }

    @Transactional
    @Override
    public List<JSONObject> getPostlistByTitle(String yPostTitle) {
        return YPostMapper.getPostlistByTitle(yPostTitle);
    }


}
